package com.nikkerball.apps.darkhorse.web.security;

import com.nikkerball.apps.HomePage;
import com.nikkerball.apps.darkhorse.web.base.BasePage;
import org.apache.wicket.markup.html.form.Button;
import org.apache.wicket.markup.html.form.Form;

/**
 * TODO: Document class
 *
 * @author marius (created on 2010-12-14)
 */
public class SignInPage extends BasePage {

    // ----- constructors -----

    public SignInPage() {
        Form signInForm = new Form("signInForm");
        Button signInButton = new Button("signInButton") {
            @Override
            public void onSubmit() {
                SignInPage.this.getSession().setSignedIn(true);
                SignInPage.this.getSession().setUserName("marius");
                setResponsePage(HomePage.class);
            }
        };
        signInForm.add(signInButton);
        add(signInForm);
    }
}
